{-# LANGUAGE OverloadedStrings #-}

import Util
import Text.LaTeX
import Text.LaTeX.Base.Class
import Text.LaTeX.Base.Syntax
import Text.LaTeX.Packages.Graphicx
import Text.LaTeX.Packages.Geometry

main :: IO ()
main = printdoc doc

doc :: Monad m => LaTeXT_ m
doc = do
    mapM_ (\y -> mapM (\x -> z x y) [0 :: Double, 0.1 .. y - 0.2]) [0.5 :: Double, 0.55 .. 1]

z :: LaTeXC l => Double -> Double -> l
z x y = textblock' (vw x) (vh y) $ rotatebox' ((x + y) * (-180) / pi - 90) $ fontsize (vh $ y * 0.05) (vw 0) "crashing crashing crashing"
